package de.jmda.mview;

import javax.swing.DesktopManager;
import javax.swing.JComponent;
import javax.swing.JInternalFrame;

/**
 * Delegates events to {@link #desktopManager}
 */
public abstract class DesktopManagerBase implements DesktopManager
{
	protected DesktopManager desktopManager;

	protected DesktopManagerBase(DesktopManager desktopManager)
	{
		this.desktopManager = desktopManager;
	}

	public void openFrame(JInternalFrame f)
	{
		desktopManager.openFrame(f);
	}

	public void closeFrame(JInternalFrame f)
	{
		desktopManager.closeFrame(f);
	}

	public void maximizeFrame(JInternalFrame f)
	{
		desktopManager.maximizeFrame(f);
	}

	public void minimizeFrame(JInternalFrame f)
	{
		desktopManager.minimizeFrame(f);
	}

	public void iconifyFrame(JInternalFrame f)
	{
		desktopManager.iconifyFrame(f);
	}

	public void deiconifyFrame(JInternalFrame f)
	{
		desktopManager.deiconifyFrame(f);
	}

	public void activateFrame(JInternalFrame f)
	{
		desktopManager.activateFrame(f);
	}

	public void deactivateFrame(JInternalFrame f)
	{
		desktopManager.deactivateFrame(f);
	}

	public void beginDraggingFrame(JComponent f)
	{
		desktopManager.beginDraggingFrame(f);
	}

	public void dragFrame(JComponent f, int newX, int newY)
	{
		desktopManager.dragFrame(f, newX, newY);
	}

	public void endDraggingFrame(JComponent f)
	{
		desktopManager.endDraggingFrame(f);
	}

	public void beginResizingFrame(JComponent f, int direction)
	{
		desktopManager.beginResizingFrame(f, direction);
	}

	public void resizeFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)
	{
		desktopManager.resizeFrame(f, newX, newY, newWidth, newHeight);
	}

	public void endResizingFrame(JComponent f)
	{
		desktopManager.endResizingFrame(f);
	}

	public void setBoundsForFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)
	{
		desktopManager.setBoundsForFrame(f, newX, newY, newWidth, newHeight);
	}
}